package tds.model29;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName ConcreteVistor1
 * @Description 访问者
 * @author tds
 * @Date 2020/2/8 21:41
 * @version 1.0.0
 */
public class ConcreteVistor2 implements Vistor {

    private String name;

    public String getName() {
        return name;
    }

    public ConcreteVistor2(String name) {
        this.name = name;
    }

    @Override
    public void visitConcreteElementA(ConcreateElementA elementA) {
        System.out.printf("访问者2%s访问了ConcreateElementA %s", name, elementA.getName());
    }

    @Override
    public void visitConcreteElementB(ConcreateElementB elementB) {
        System.out.printf("访问者2%s访问了ConcreateElementB %s", name, elementB.getName());
    }
}
